<template>
    <h3>
        <br>
        请输入要发送的内容：<input type="text" v-model="msg">
        <button @click="postMsg">发送</button>
    </h3>
</template>

<script>
export default {
    data(){
        return{
            msg:''
        }
    },
    methods:{
        postMsg(){
            this.$emit("getMsg",this.msg)
        }
    }
}
</script>

